*******************************************************************************************************
*This is the code to replicate the results of the article "Left-wing governments and far-right success"
*Read the README.txt file first
*November 2025
*******************************************************************************************************


**********STUDY 1**********

use comparative_backlash.dta, clear

*************
*PREPARATION*
*************

xtset country_id election_n


**********
*FIGURE 1*
**********

twoway (lpoly frsup_fam election_year if election_year>1944, sort yaxis(1) lwidth(medthick)) ///
	(lpoly ideolcab_w election_year if election_year>1944, sort yaxis(2) lwidth(medthick)) ///
	, ytitle("Vote share of far-right parties", axis(1)) ylabel(0(2)12, nogrid axis(1)) ///
	ytitle("Government position (L-R)", axis(2)) ylabel(4(.5)6.5, nogrid axis(2)) ///
	xlabel(1940(10)2020, labsize(vsmall)) xtitle("") ///
	legend(order(1 "Far-right support" 2 "Government ideology") pos(4) col(1) size(small)) ///
	scheme(plotplain)



*********
*TABLE 1*
*********

quietly {
	estimates clear

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, noabsorb
		est store comp1
		estadd local ldv "Yes"
		estadd local country_fe "No"
		estadd local year_fe "No"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, absorb(election_year)
		est store comp2
		estadd local ldv "Yes"
		estadd local country_fe "No"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, absorb(country_name_short election_year)
		est store comp3
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944 & parl==1, absorb(country_name_short election_year)
		est store comp4
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "Parl."
		estadd local nc = 29
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944 & westeur==1, absorb(country_name_short election_year)
		est store comp5
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "West Eur."
		estadd local nc = 19
		estadd local n = e(N)
}

esttab comp1 comp2 comp3 comp4 comp5, replace noomitted label nonotes noobs nodepvar nomtitles noconstant ///
 keep(ideolcab_w) ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 scalars("ldv Lagged DV" "year_fe Year FE" "country_fe Country FE" "sample Sample" "nc N. countries" "n N. obs.") ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********
*FIGURE 2*
**********

quietly {
	estimates clear

	reg frsup_fam l.frsup_fam c.ideolcab_w i.country_id i.election_year if caretaker==0 & election_year>1944
	margins , at(ideolcab_w=(3 7)) saving(all, replace)
	reg frsup_fam l.frsup_fam c.ideolcab_w i.country_id i.election_year if caretaker==0 & parl==1 & election_year>1944
	margins , at(ideolcab_w=(3 7)) saving(parl, replace)
	reg frsup_fam l.frsup_fam c.ideolcab_w i.country_id i.election_year if caretaker==0 & westeur==1 & election_year>1944
	margins , at(ideolcab_w=(3 7)) saving(we, replace)
}

combomarginsplot all parl we, recast(scatter) recastci(rspike) offset(0.2) title("") ///
	xscale(range(2 8)) xlabel(3 "Left-wing government (L-R = 3)" 7 "Right-wing government (L-R = 7)") xtitle("") ///
	yscale(range(2 7)) ylabel(2(1)7) ytitle("Far-right vote share (t+1)") ///
	plot1opts(msymbol(circle) mfcolor(white) msize(medlarge) mlwidth(medthick)) ci1opts(lwidth(medthick)) ///
	plot2opts(msymbol(square) mfcolor(white) msize(medlarge) mlwidth(medthick)) ci2opts(lwidth(medthick)) ///
	plot3opts(msymbol(diamond) mfcolor(white) msize(medlarge) mlwidth(medthick)) ci3opts(lwidth(medthick)) ///
	legend(order(4 "All countries" 5 "Parliamentary" 6 "West Europe") pos(4) col(1) size(small)) ///
	scheme(plotplain)



**********
*TABLE A2*
**********

quietly {
	estimates clear

	quietly {
	capt prog drop appendmodels
	*! version 1.0.0  14aug2007  Ben Jann
	program appendmodels, eclass
		 // using first equation of model
		 version 8
		 syntax namelist
		 tempname b V tmp
		 foreach name of local namelist {
			 qui est restore `name'
			 mat `tmp' = e(b)
			 local eq1: coleq `tmp'
			 gettoken eq1 : eq1
			 mat `tmp' = `tmp'[1,"`eq1':"]
			 local cons = colnumb(`tmp',"_cons")
			 if `cons'<. & `cons'>1 {
				 mat `tmp' = `tmp'[1,1..`cons'-1]
			 }
			 mat `b' = nullmat(`b') , `tmp'
			 mat `tmp' = e(V)
			 mat `tmp' = `tmp'["`eq1':","`eq1':"]
			 if `cons'<. & `cons'>1 {
				 mat `tmp' = `tmp'[1..`cons'-1,1..`cons'-1]
			 }
			 capt confirm matrix `V'
			 if _rc {
				 mat `V' = `tmp'
			 }
			 else {
				 mat `V' = ///
				 ( `V' , J(rowsof(`V'),colsof(`tmp'),0) ) \ ///
				 ( J(rowsof(`tmp'),colsof(`V'),0) , `tmp' )
			 }
		 }
		 local names: colfullnames `b'
		 mat coln `V' = `names'
		 mat rown `V' = `names'
		 eret post `b' `V'
		 eret local cmd "whatever"
	end
	}


	levelsof country_name_short, local(clabel) clean

	estimates clear

	quietly foreach country of local clabel {
		gen `country'=ideolcab_w
		eststo rob_`country': reghdfe frsup_fam l.frsup_fam c.`country' if caretaker==0 & election_year>1944 & country_name_short!="`country'", absorb(country_name_short election_year)
		drop `country'
	}

	eststo remove: appendmodels rob_AUS rob_AUT rob_BEL rob_BGR rob_CAN rob_CHE rob_CYP rob_CZE rob_DEU rob_DNK rob_ESP rob_EST rob_FIN rob_FRA rob_GBR rob_GRC rob_HRV rob_HUN rob_IRL rob_ISL rob_ISR rob_ITA rob_JPN rob_LTU rob_LUX rob_LVA rob_MLT rob_NLD rob_NOR rob_NZL rob_POL rob_PRT rob_ROU rob_SVK rob_SVN rob_SWE rob_TUR
}

esttab remove, replace noomitted label nonotes noobs nodepvar nomtitles noconstant wide ///
 keep(AUS AUT BEL BGR CAN CHE CYP CZE DEU DNK ESP EST FIN FRA GBR GRC HRV HUN IRL ISL ISR ITA JPN LTU LUX LVA MLT NLD NOR NZL POL PRT ROU SVK SVN SWE TUR) ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********
*TABLE A3*
**********

quietly {
	estimates clear

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, noabsorb vce(cluster cabinet_id)
		est store comp_clust1
		estadd local ldv "Yes"
		estadd local country_fe "No"
		estadd local year_fe "No"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, absorb(election_year) vce(cluster cabinet_id)
		est store comp_clust2
		estadd local ldv "Yes"
		estadd local country_fe "No"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, absorb(country_name_short election_year) vce(cluster cabinet_id)
		est store comp_clust3
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944 & parl==1, absorb(country_name_short election_year) vce(cluster cabinet_id)
		est store comp_clust4
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "Parl."
		estadd local nc = 29
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944 & westeur==1, absorb(country_name_short election_year) vce(cluster cabinet_id)
		est store comp_clust5
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "West Eur."
		estadd local nc = 19
		estadd local n = e(N)
}

esttab comp_clust1 comp_clust2 comp_clust3 comp_clust4 comp_clust5, replace noomitted label nonotes noobs nodepvar nomtitles noconstant ///
 keep(ideolcab_w) ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 scalars("ldv Lagged DV" "year_fe Year FE" "country_fe Country FE" "sample Sample" "nc N. countries" "n N. obs.") ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")

 

**********
*TABLE A4*
**********

quietly {
	estimates clear

	reghdfe d.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, noabsorb vce(cluster country_name_short)
		est store comp_fd1
		estadd local ldv "No"
		estadd local country_fe "No"
		estadd local year_fe "No"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe d.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, absorb(election_year) vce(cluster country_name_short)
		est store comp_fd2
		estadd local ldv "No"
		estadd local country_fe "No"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe d.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, absorb(country_name_short election_year) vce(cluster country_name_short)
		est store comp_fd3
		estadd local ldv "No"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe d.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944 & parl==1, absorb(country_name_short election_year) vce(cluster country_name_short)
		est store comp_fd4
		estadd local ldv "No"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "Parl."
		estadd local nc = 29
		estadd local n = e(N)

	reghdfe d.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944 & westeur==1, absorb(country_name_short election_year) vce(cluster country_name_short)
		est store comp_fd5
		estadd local ldv "No"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "West Eur."
		estadd local nc = 19
		estadd local n = e(N)
}

esttab comp_fd1 comp_fd2 comp_fd3 comp_fd4 comp_fd5, replace noomitted label nonotes noobs nodepvar nomtitles noconstant ///
 keep(ideolcab_w) ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 scalars("ldv Lagged DV" "year_fe Year FE" "country_fe Country FE" "sample Sample" "nc N. countries" "n N. obs.") ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********
*TABLE A5*
**********

quietly {
	estimates clear

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w i.fringov if caretaker==0 & election_year>1944, noabsorb
		est store frincont1
		estadd local ldv "Yes"
		estadd local contfr "Yes"
		estadd local country_fe "No"
		estadd local year_fe "No"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w i.fringov if caretaker==0 & election_year>1944, absorb(election_year)
		est store frincont2
		estadd local ldv "Yes"
		estadd local contfr "Yes"
		estadd local country_fe "No"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w i.fringov if caretaker==0 & election_year>1944, absorb(country_name_short election_year)
		est store frincont3
		estadd local ldv "Yes"
		estadd local contfr "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w i.fringov if caretaker==0 & parl==1 & election_year>1944, absorb(country_name_short election_year)
		est store frincont4
		estadd local ldv "Yes"
		estadd local contfr "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "Parl."
		estadd local nc = 29
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w i.fringov if caretaker==0 & westeur==1 & election_year>1944, absorb(country_name_short election_year)
		est store frincont5
		estadd local ldv "Yes"
		estadd local contfr "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "West Eur."
		estadd local nc = 19
		estadd local n = e(N)
}

esttab frincont1 frincont2 frincont3 frincont4 frincont5, replace noomitted label nonotes noobs nodepvar nomtitles noconstant ///
 keep(ideolcab_w) ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 scalars("ldv Lagged DV" "contfr Control FR incumbent" "country_fe Country FE" "year_fe Year FE" "sample Sample" "nc N. countries" "n N. obs.") ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********
*TABLE A6*
**********

quietly {
	estimates clear

	reghdfe frsup_fam l.frsup_fam i.leftcab5_w if caretaker==0 & election_year>1944, noabsorb
		est store leftcab1
		estadd local ldv "Yes"
		estadd local country_fe "No"
		estadd local year_fe "No"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam i.leftcab5_w if caretaker==0 & election_year>1944, absorb(election_year)
		est store leftcab2
		estadd local ldv "Yes"
		estadd local country_fe "No"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam i.leftcab5_w if caretaker==0 & election_year>1944, absorb(country_name_short election_year)
		est store leftcab3
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam i.leftcab5_w if caretaker==0 & parl==1 & election_year>1944, absorb(country_name_short election_year)
		est store leftcab4
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "Parl."
		estadd local nc = 29
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam i.leftcab5_w if caretaker==0 & westeur==1 & election_year>1944, absorb(country_name_short election_year)
		est store leftcab5
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "West Eur."
		estadd local nc = 19
		estadd local n = e(N)

	reghdfe d.frsup_fam i.leftcab5_w if caretaker==0 & election_year>1944, noabsorb
		est store leftcab6
		estadd local ldv "No"
		estadd local country_fe "No"
		estadd local year_fe "No"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe d.frsup_fam i.leftcab5_w if caretaker==0 & election_year>1944, absorb(election_year)
		est store leftcab7
		estadd local ldv "No"
		estadd local country_fe "No"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe d.frsup_fam i.leftcab5_w if caretaker==0 & election_year>1944, absorb(country_name_short election_year)
		est store leftcab8
		estadd local ldv "No"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe d.frsup_fam i.leftcab5_w if caretaker==0 & parl==1 & election_year>1944, absorb(country_name_short election_year)
		est store leftcab9
		estadd local ldv "No"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "Parl."
		estadd local nc = 29
		estadd local n = e(N)

	reghdfe d.frsup_fam i.leftcab5_w if caretaker==0 & westeur==1 & election_year>1944, absorb(country_name_short election_year)
		est store leftcab10
		estadd local ldv "No"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "West Eur."
		estadd local nc = 19
		estadd local n = e(N)
}

esttab leftcab1 leftcab2 leftcab3 leftcab4 leftcab5 leftcab6 leftcab7 leftcab8 leftcab9 leftcab10, replace noomitted label nonotes noobs nodepvar nomtitles noconstant ///
 keep(1.leftcab5_w) ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 mgroups("Far-right vote share (levels)" "$\Delta$ in far-right vote share", pattern(1 0 0 0 0 1 0 0 0 0) span) ///
 scalars("ldv Lagged DV" "year_fe Year FE" "country_fe Country FE" "sample Sample" "nc N. countries" "n N. obs.") ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



***********
*FIGURE A1*
***********

quietly {
	estimates clear

	reg frsup_fam l.frsup_fam b1.pm_party_fam_group if caretaker==0 & election_year>1944, cluster(cabinet_id)
	margins , at(pm_party_fam_group=(1 2)) saving(all, replace)
	reg frsup_fam l.frsup_fam b1.pm_party_fam_group i.election_year if caretaker==0 & election_year>1944, cluster(cabinet_id)
	margins , at(pm_party_fam_group=(1 2)) saving(all_yfe, replace)
	reg frsup_fam l.frsup_fam b1.pm_party_fam_group i.election_year i.country_id if caretaker==0 & election_year>1944, cluster(cabinet_id)
	margins , at(pm_party_fam_group=(1 2)) saving(all_ycfe, replace)
	reg frsup_fam l.frsup_fam b1.pm_party_fam_group i.election_year i.country_id if caretaker==0 & election_year>1944 & parl==1, cluster(cabinet_id)
	margins , at(pm_party_fam_group=(1 2)) saving(parl, replace)
	reg frsup_fam l.frsup_fam b1.pm_party_fam_group i.election_year i.country_id if caretaker==0 & election_year>1944 & westeur==1, cluster(cabinet_id)
	margins , at(pm_party_fam_group=(1 2)) saving(we, replace)
}

combomarginsplot all all_yfe all_ycfe, recast(scatter) recastci(rspike) offset(0.05) title("") ///
	xlabel(1 "Mainstream-left PM" 2 "Mainstream-right PM") xscale(range(.75 2.25)) xtitle("") ///
	yscale(range(2.5 6.5)) ylabel(3(.5)6) ytitle("Predicted far-right support (t+1)") ///
	plot1opts(msymbol(X) mfcolor(white) msize(medlarge) mlwidth(medthick)) ci1opts(lwidth(medthick)) ///
	plot2opts(msymbol(triangle) mfcolor(white) msize(medlarge) mlwidth(medthick)) ci2opts(lwidth(medthick)) ///
	plot3opts(msymbol(circle) mfcolor(white) msize(medlarge) mlwidth(medthick)) ci3opts(lwidth(medthick)) ///
	legend(order(4 "No FE" 5 "Year FE" 6 "Year & Country FE") pos(4) col(1) size(small)) ///
	scheme(plotplain)


**********
*TABLE A7*
**********

quietly {
	estimates clear

	reghdfe modrightsup_fam l.modrightsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, noabsorb
		est store modright1
		estadd local ldv "Yes"
		estadd local country_fe "No"
		estadd local year_fe "No"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe modrightsup_fam l.modrightsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, absorb(election_year)
		est store modright2
		estadd local ldv "Yes"
		estadd local country_fe "No"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe modrightsup_fam l.modrightsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, absorb(country_name_short election_year)
		est store modright3
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe modrightsup_fam l.modrightsup_fam c.ideolcab_w if caretaker==0 & election_year>1944 & parl==1, absorb(country_name_short election_year)
		est store modright4
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "Parl."
		estadd local nc = 29
		estadd local n = e(N)

	reghdfe modrightsup_fam l.modrightsup_fam c.ideolcab_w if caretaker==0 & election_year>1944 & westeur==1, absorb(country_name_short election_year)
		est store modright5
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "West Eur."
		estadd local nc = 19
		estadd local n = e(N)
}

esttab modright1 modright2 modright3 modright4 modright5 , replace noomitted label nonotes noobs nodepvar nomtitles noconstant ///
 keep(ideolcab_w) ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 scalars("ldv Lagged DV" "year_fe Year FE" "country_fe Country FE" "sample Sample" "nc N. countries" "n N. obs.") ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")

 

**********
*TABLE D1*
**********

quietly {
	est clear

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, noabsorb
		est store comp1
		estadd local ldv "Yes"
		estadd local country_fe "No"
		estadd local year_fe "No"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, absorb(election_year)
		est store comp2
		estadd local ldv "Yes"
		estadd local country_fe "No"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944, absorb(country_name_short election_year)
		est store comp3
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "All"
		estadd local nc = 37
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944 & parl==1, absorb(country_name_short election_year)
		est store comp4
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "Parl."
		estadd local nc = 29
		estadd local n = e(N)

	reghdfe frsup_fam l.frsup_fam c.ideolcab_w if caretaker==0 & election_year>1944 & westeur==1, absorb(country_name_short election_year)
		est store comp5
		estadd local ldv "Yes"
		estadd local country_fe "Yes"
		estadd local year_fe "Yes"
		estadd local sample = "West Eur."
		estadd local nc = 19
		estadd local n = e(N)
}

esttab comp1 comp2 comp3 comp4 comp5, replace noomitted label nonotes noobs nodepvar nomtitles noconstant ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 scalars("ldv Lagged DV" "year_fe Year FE" "country_fe Country FE" "sample Sample" "nc N. countries" "n N. obs.") ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********STUDY 2**********

use rdd_backlash.dta, clear


*************
*PREPARATION*
*************

keep if nlp>1 /*Drop local councils with only one party*/


**********
*FIGURE 3*
**********

rdbwselect mayor_left forcing_pp if small==0 & forcing_pp!=0 & year==2015, kernel(uni) /*Selection of optimal bandwidth*/

rdplot mayor_left forcing_pp if small==0 & forcing_pp!=0 & year==2015 & inrange(forcing_pp,-.15,.15), p(1) graph_options(legend(off) ytitle("Pr(Left-wing mayor)", size(medium)) xtitle("Margin of victory main conservative party", size(medium)) xlabel(-.16(.02).16, labsize(*1.5) glpattern(dash) glwidth(none)) ylabel(0(.1)1, labsize(*1.5) glpattern(dash) glwidth(none)))


*********
*TABLE 2*
*********

rdbwselect vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) /*Selection of optimal bandwidth*/
ereturn clear

quietly {
	estimates clear

	ivregress 2sls vox_vs_cong1904 c.forcing_pp c.forcing_pp#i.first_pp (mayor_left = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.15,.15) & year==2015, first
	quietly rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
	estimates store main1
	estadd scalar iv =  e(tau_cl)
	estadd scalar first =  e(tau_T_cl)
	estadd scalar bw = e(h_l)
	estadd scalar en =  e(N_h_l) +  e(N_h_r)
	estadd scalar n = e(N_l) + e(N_r)

	rdbwselect vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) /*Selection of optimal bandwidth*/
	ereturn clear

	ivregress 2sls vox_vs_cong1911 c.forcing_pp c.forcing_pp#i.first_pp (mayor_left = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.15,.15) & year==2015, first
	quietly rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
	estimates store main2
	estadd scalar iv =  e(tau_cl)
	estadd scalar first =  e(tau_T_cl)
	estadd scalar bw = e(h_l)
	estadd scalar en =  e(N_h_l) +  e(N_h_r)
	estadd scalar n = e(N_l) + e(N_r)
}

esttab main1 main2, replace noomitted label nonotes noobs nodepvar nonumbers nogaps ///
 mtitles("Apr. 2019" "Nov. 2019") ///
 varlabels(RD_Estimate "Left mayor 2015 (2SLS)") collabels("" "") ///
 b(%9.3fc) se(%9.3fc) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 stats(first bw en n, label("First-stage" "Bandwidth" "Effective N" "N") fmt(%9.3gc)) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********
*FIGURE 4*
**********

*Left plot
rdplot vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & inrange(forcing_pp,-.15,.15), p(1) graph_options(legend(off) ytitle("VOX vote share (April 2019)", size(medium)) xtitle("Margin of victory main conservative party", size(medium)) xlabel(-.16(.02).16, labsize(*1.5) glpattern(dash) glwidth(none)) ylabel(.08(.01).15, labsize(*1.5) glpattern(dash) glwidth(none)))

*Right plot
rdplot vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & inrange(forcing_pp,-.15,.15), p(1) graph_options(legend(off) ytitle("VOX vote share (November 2019)", size(medium)) xtitle("Margin of victory main conservative party", size(medium)) xlabel(-.16(.02).16, labsize(*1.5) glpattern(dash) glwidth(none)) ylabel(.12(.01).22, labsize(*1.5) glpattern(dash) glwidth(none)))



**********
*FIGURE 5*
**********

quietly {
	set seed 1234
	gen mayor_left2019_noise=mayor_left2019+(runiform()-0.5)/40 
}

*Upper plot
graph twoway ///
  (lfit mayor_left2019_noise forcing_pp if small==0 & forcing_pp!=0 & year==2019 & inrange(forcing_pp,-.14,0), lcolor(gray)) ///
  (lfit mayor_left2019_noise forcing_pp if small==0 & forcing_pp!=0 & year==2019 & inrange(forcing_pp,0,.14), lcolor(gray)) ///
  (scatter mayor_left2019_noise forcing_pp if small==0 & forcing_pp!=0 & year==2019 & inrange(forcing_pp,-.14,-.039999), mcolor(gray)) ///
  (scatter mayor_left2019_noise forcing_pp if small==0 & forcing_pp!=0 & year==2019 & inrange(forcing_pp,.040001,.14), mcolor(gray)) ///
  (scatter mayor_left2019_noise forcing_pp if small==0 & forcing_pp!=0 & year==2019 & inrange(forcing_pp,-.04,-.000001) & mayor_left2019==0, mcolor(538b*.5)) ///
  (scatter mayor_left2019_noise forcing_pp if small==0 & forcing_pp!=0 & year==2019 & inrange(forcing_pp,.000001,.04) & mayor_left2019==1, mcolor(538r*.5)) ///
  (scatter mayor_left2019_noise forcing_pp if small==0 & forcing_pp!=0 & year==2019 & inrange(forcing_pp,-.04,-.000001) & mayor_left2019==1, mcolor(538r)) ///
  (scatter mayor_left2019_noise forcing_pp if small==0 & forcing_pp!=0 & year==2019 & inrange(forcing_pp,.000001,.04) & mayor_left2019==0, mcolor(538b)) ///
  , xline(0, lpattern(shortdash) lwidth(medium) lcolor(gray)) legend(off) ytitle("Pr(Left-wing mayor)", size(medium)) xtitle("Margin of victory main conservative party", size(medium)) xlabel(-.14(.02).14, labsize(*1.5) glstyle(none)) ylabel(0(.1)1, labsize(*1.5) glstyle(none))

*Bottom plot (map)

frame create map
frame change map

use municipios_ign_db, clear

destring CODIGOINE, gen(provmuni)

merge 1:1 provmuni using spain_coord_mod.dta

preserve
drop if CODNUT1=="ES7"

*Spain's mainland
spmap rddsample using municipios_ign_coord.dta, id(_ID) fcolor(538r 538r*.4 538b 538b*.4) clmethod(unique) title("", pos(11) size(medlarge)) legend(size(vsmall) label(2 "Left mayor - Left winner (Compliant)") label(3 "Left mayor - Right winner (Non-compliant)") label(4 "Right mayor - Right winner (Compliant)") label(5 "Right mayor - Left winner (Non-compliant)") rows(2) order(2 4 3 5)) ocolor(black) ndocolor(black*.3) osize(vthin)

restore
keep if CODNUT1=="ES7"

*Canary Islands
spmap rddsample using municipios_ign_coord.dta, id(_ID) fcolor(538r 538r*.4 538b 538b*.4) clmethod(unique) title("", pos(11) size(medlarge)) legend(size(medium)) ocolor(black) ndocolor(black*.3) osize(vthin) legend(off) title("")

frame change default
frame drop map



***********************
*TABLE B1 (TRANSPOSED)*
***********************

quietly {
	estimates clear

	rdrobust population forcing_pp if small==0 & forcing_pp!=0 & year==2015, h(.15) kernel(uni)
		quietly estimates store bal01
		quietly estadd scalar pcl = e(pv_cl)
		quietly estadd scalar bwcl = e(h_l)
		quietly estadd scalar en =  e(N_h_l) +  e(N_h_r)
		quietly estadd scalar n = e(N_l) + e(N_r)

	rdrobust logpop forcing_pp if small==0 & forcing_pp!=0 & year==2015, h(.15) kernel(uni)
		quietly estimates store bal02
		quietly estadd scalar pcl = e(pv_cl)
		quietly estadd scalar bwcl = e(h_l)
		quietly estadd scalar en =  e(N_h_l) +  e(N_h_r)
		quietly estadd scalar n = e(N_l) + e(N_r)

	rdrobust unempl_rate_2011 forcing_pp if small==0 & forcing_pp!=0 & year==2015, h(.15) kernel(uni)
		quietly estimates store bal03
		quietly estadd scalar pcl = e(pv_cl)
		quietly estadd scalar bwcl = e(h_l)
		quietly estadd scalar en =  e(N_h_l) +  e(N_h_r)
		quietly estadd scalar n = e(N_l) + e(N_r)

	rdrobust coast forcing_pp if small==0 & forcing_pp!=0 & year==2015, h(.15) kernel(uni)
		quietly estimates store bal04
		quietly estadd scalar pcl = e(pv_cl)
		quietly estadd scalar bwcl = e(h_l)
		quietly estadd scalar en =  e(N_h_l) +  e(N_h_r)
		quietly estadd scalar n = e(N_l) + e(N_r)

	rdrobust rural forcing_pp if small==0 & forcing_pp!=0 & year==2015, h(.15) kernel(uni)
		quietly estimates store bal05
		quietly estadd scalar pcl = e(pv_cl)
		quietly estadd scalar bwcl = e(h_l)
		quietly estadd scalar en =  e(N_h_l) +  e(N_h_r)
		quietly estadd scalar n = e(N_l) + e(N_r)

	rdrobust nep forcing_pp if small==0 & forcing_pp!=0 & year==2015, h(.15) kernel(uni)
		quietly estimates store bal06
		quietly estadd scalar pcl = e(pv_cl)
		quietly estadd scalar bwcl = e(h_l)
		quietly estadd scalar en =  e(N_h_l) +  e(N_h_r)
		quietly estadd scalar n = e(N_l) + e(N_r)

	rdrobust turnout forcing_pp if small==0 & forcing_pp!=0 & year==2015, h(.15) kernel(uni)
		quietly estimates store bal07
		quietly estadd scalar pcl = e(pv_cl)
		quietly estadd scalar bwcl = e(h_l)
		quietly estadd scalar en =  e(N_h_l) +  e(N_h_r)
		quietly estadd scalar n = e(N_l) + e(N_r)

	rdrobust pp_vs forcing_pp if small==0 & forcing_pp!=0 & year==2015, h(.15) kernel(uni)
		quietly estimates store bal08
		quietly estadd scalar pcl = e(pv_cl)
		quietly estadd scalar bwcl = e(h_l)
		quietly estadd scalar en =  e(N_h_l) +  e(N_h_r)
		quietly estadd scalar n = e(N_l) + e(N_r)

	rdrobust psoe_vs forcing_pp if small==0 & forcing_pp!=0 & year==2015, h(.15) kernel(uni)
		quietly estimates store bal09
		quietly estadd scalar pcl = e(pv_cl)
		quietly estadd scalar bwcl = e(h_l)
		quietly estadd scalar en =  e(N_h_l) +  e(N_h_r)
		quietly estadd scalar n = e(N_l) + e(N_r)
}

esttab bal*, replace nonumbers nogaps ///
  cells(b(fmt(%9.3gc)) se(par)) varlabels(RD_Estimate "RD Estimate") collabels("" "") ///
  stats(pcl en n, labels("P-value" "Effective N" "N") fmt(%9.3gc 0 0)) ///
  mlabels("Population" ///
  "Population (log)" ///
  "Unemployment rate (2011)" ///
  "Coast" ///
  "Rural" ///
  "N. of Electoral Parties" ///
  "Turnout (t)" ///
  "Conservative vote share -PP- (t)" ///
  "Social-democratic vote share -PSOE- (t)") ///
  addnotes()



***********
*FIGURE B1*
***********

*Left plot
histogram forcing_pp if small==0 & forcing_pp!=0, freq start(-.95) width(.05) color(gs3) ///
  addplot(histogram forcing_pp if small==0 & forcing_pp!=0, freq start(-.95) width(.025) color(gs7) || ///
  histogram forcing_pp if small==0 & forcing_pp!=0, freq start(-.95) width(.01)  xlabel(-.95(.05).8) ylabel(0(100)1000) color(gs11) || ///
  scatteri 0 0 1000 0, recast(line) lc(black) lp(dash) legend(off) || ///
  , ytitle("Frequency", size(medium)) xtitle("Margin of victory of the main conservative party", size(medium)) legend(order(1 "Bin width = 5%" 2 "Bin width = 2.5%" 3 "Bin width = 1%") position (6) row(1)) ///
  xlabel(, glwidth(none)) ylabel(, labsize(*1.5) glwidth(none)))

*Right plot
rddensity forcing_pp if small==0 & forcing_pp!=0 & year==2015, plot graph_opt(legend(off) xlabel(-.5(.1).4, labsize(*1.5) glwidth(none)) ylabel(0(.2)1.6, labsize(*1.5) glwidth(none)) xtitle("Margin of victory of the main conservative party", size(medium)) ytitle("Density", size(medium)))



***********
*FIGURE B2*
***********

*Left plot

quietly {
	estimates clear

	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.30)
		estimates store apr_bw30
	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.275)
		estimates store apr_bw275
	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.25)
		estimates store apr_bw25
	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.225)
		estimates store apr_bw225
	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.20)
		estimates store apr_bw20
	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.175)
		estimates store apr_bw175
	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store apr_bw15
	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.125)
		estimates store apr_bw125
	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.10)
		estimates store apr_bw10
	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.075)
		estimates store apr_bw075
	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.05)
		estimates store apr_bw05
	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.025)
		estimates store apr_bw025

	frame create bw_apr
	frame change bw_apr

	coefplot apr_bw025 apr_bw05 apr_bw075 apr_bw10 apr_bw125 apr_bw15 apr_bw175 apr_bw20 apr_bw225 apr_bw25 apr_bw275 apr_bw30, nodraw vertical yline(0,) legend(off) ciopts(lcolor(black) recast(rcap)) gen(_c) replace
	keep _c*
	gen bw = .
	local bw_sizes .025 .05 .075 .10 .125 .15 .175 .20 .225 .25 .275 .30 
		forvalues i = 1/12{
			local bw_value: word `i' of `bw_sizes'
			replace bw = `bw_value' if [_n] == `i'
		}
}

scatter _cb bw, mc(black) || rcap _cul1 _cll1 bw, lc(black) ||, ///
	xlabel(0(.025).30) xscale(range(0 .31)) ylabel(-.05(.05).3) yline(0, lp(dash)) legend(off) ///
	xtitle("RD bandwidth") xscale(titlegap(*5)) ///
	ytitle("RD estimate (95% CI)") yscale(titlegap(*0)) ///
	title(April 2019) ///
	scheme(plotplain)

quietly {
	frame change default
	frame drop bw_apr
}


*Right plot
quietly {
estimates clear

rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.30)
	estimates store nov_bw30
rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.275)
	estimates store nov_bw275
rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.25)
	estimates store nov_bw25
rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.225)
	estimates store nov_bw225
rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.20)
	estimates store nov_bw20
rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.175)
	estimates store nov_bw175
rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
	estimates store nov_bw15
rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.125)
	estimates store nov_bw125
rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.10)
	estimates store nov_bw10
rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.075)
	estimates store nov_bw075
rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.05)
	estimates store nov_bw05
rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.025)
	estimates store nov_bw025

frame create bw_nov
frame change bw_nov

coefplot nov_bw025 nov_bw05 nov_bw075 nov_bw10 nov_bw125 nov_bw15 nov_bw175 nov_bw20 nov_bw225 nov_bw25 nov_bw275 nov_bw30, nodraw vertical yline(0,) legend(off) ciopts(lcolor(black) recast(rcap)) gen(_c) replace
keep _c*
gen bw = .
local bw_sizes .025 .05 .075 .10 .125 .15 .175 .20 .225 .25 .275 .30 
	forvalues i = 1/12{
		local bw_value: word `i' of `bw_sizes'
		replace bw = `bw_value' if [_n] == `i'
	}
}

scatter _cb bw, mc(black) || rcap _cul1 _cll1 bw, lc(black) ||, ///
	xlabel(0(.025).30) xscale(range(0 .31)) ylabel(-.05(.05).3) yline(0, lp(dash)) legend(off) ///
	xtitle("RD bandwidth") xscale(titlegap(*5)) ///
	ytitle("RD estimate (95% CI)") yscale(titlegap(*0)) ///
	title(November 2019) ///
	scheme(plotplain)

quietly {
	frame change default
	frame drop bw_nov
}



**********
*TABLE B2*
**********

quietly {
	estimates clear

	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store kernel1
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)

	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(tri) h(.15)
		estimates store kernel2
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)

	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(epa) h(.18)
		estimates store kernel3
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)

	rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.18)
		estimates store kernel4
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)

	rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(tri) h(.18)
		estimates store kernel5
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)

	rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(epa) h(.17)
		estimates store kernel6
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
}


esttab kernel*, replace noomitted label nonotes noobs nodepvar nonumbers nogaps ///
 mlabels("Uniform" "Triangular" "Epan." "Uniform" "Triangular" "Epan.") ///
 varlabels(RD_Estimate "Left mayor 2015 (2SLS)") collabels("" "") mgroups("Apr. 2019" "Nov. 2019", pattern(1 0 0 1 0 0) span) ///
 b(%9.3fc) se(%9.3fc) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 stats(first bw en n, label("First-stage" "Bandwidth" "Effective N" "N") fmt(%9.3gc)) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")

 
**********
*TABLE B3*
**********

rdbwselect vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2019, fuzzy(mayor_left2019) kernel(uni) /*Selection of optimal bandwidth*/
ereturn clear

quietly {
estimates clear

quietly rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2019, fuzzy(mayor_left2019) kernel(uni) h(.15)
	estimates store fals
	estadd scalar iv =  e(tau_cl)
	estadd scalar first =  e(tau_T_cl)
	estadd scalar bw = e(h_l)
	estadd scalar en =  e(N_h_l) +  e(N_h_r)
	estadd scalar n = e(N_l) + e(N_r)
}

esttab fals, replace noomitted label nonotes noobs nodepvar nonumbers nogaps ///
 mtitles("Apr. 2019") ///
 varlabels(RD_Estimate "Left mayor June 2019 (2SLS)") collabels("" "") ///
 b(%9.3fc) se(%9.3fc) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 stats(first bw en n, label("First-stage" "Bandwidth" "Effective N" "N") fmt(%9.3gc)) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")


**********
*TABLE B4*
**********

quietly {
	estimates clear

	rdbwselect vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_psoe) kernel(uni)
	ereturn clear
	ivregress 2sls vox_vs_cong1904 c.forcing_pp c.forcing_pp#i.first_pp (mayor_psoe = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.15,.15) & year==2015, first
	quietly rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_psoe) kernel(uni) h(.15)
	estimates store ext1
	estadd scalar iv =  e(tau_cl)
	estadd scalar first =  e(tau_T_cl)
	estadd scalar bw = e(h_l)
	estadd scalar en =  e(N_h_l) +  e(N_h_r)
	estadd scalar n = e(N_l) + e(N_r)

	rdbwselect vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_psoe) kernel(uni)
	ereturn clear
	ivregress 2sls vox_vs_cong1911 c.forcing_pp c.forcing_pp#i.first_pp (mayor_psoe = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.15,.15) & year==2015, first
	quietly rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_psoe) kernel(uni) h(.15)
	estimates store ext2
	estadd scalar iv =  e(tau_cl)
	estadd scalar first =  e(tau_T_cl)
	estadd scalar bw = e(h_l)
	estadd scalar en =  e(N_h_l) +  e(N_h_r)
	estadd scalar n = e(N_l) + e(N_r)

	rdbwselect vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & mayor_main==1, fuzzy(mayor_psoe) kernel(uni)
	ereturn clear
	ivregress 2sls vox_vs_cong1904 c.forcing_pp c.forcing_pp#i.first_pp (mayor_psoe = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.14,.14) & year==2015 & mayor_main==1, first
	quietly rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & mayor_main==1, fuzzy(mayor_psoe) kernel(uni) h(.14)
	estimates store ext3
	estadd scalar iv =  e(tau_cl)
	estadd scalar first =  e(tau_T_cl)
	estadd scalar bw = e(h_l)
	estadd scalar en =  e(N_h_l) +  e(N_h_r)
	estadd scalar n = e(N_l) + e(N_r)

	rdbwselect vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & mayor_main==1, fuzzy(mayor_psoe) kernel(uni)
	ereturn clear
	ivregress 2sls vox_vs_cong1911 c.forcing_pp c.forcing_pp#i.first_pp (mayor_psoe = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.13,.13) & year==2015 & mayor_main==1, first
	quietly rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & mayor_main==1, fuzzy(mayor_psoe) kernel(uni) h(.13)
	estimates store ext4
	estadd scalar iv =  e(tau_cl)
	estadd scalar first =  e(tau_T_cl)
	estadd scalar bw = e(h_l)
	estadd scalar en =  e(N_h_l) +  e(N_h_r)
	estadd scalar n = e(N_l) + e(N_r)
}

esttab ext1 ext2 ext3 ext4, replace noomitted label nonotes noobs nodepvar nonumbers nogaps ///
 varlabels(RD_Estimate "Left mayor 2015 (2SLS)") collabels("" "") ///
 b(%9.3fc) se(%9.3fc) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 mlabels("Apr. 2019" "Nov. 2019" "Apr. 2019" "Nov. 2019") ///
 mgroups("Treatment PSOE" "Just PSOE and PP mayors", pattern(1 0 1 0) span) ///
 stats(first bw en n, label("First-stage" "Bandwidth" "Effective N" "N") fmt(%9.3gc)) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********
*TABLE B5*
**********

*Top table
quietly {
	rdrobust pp_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store pp1
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust psoe_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store psoe1
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust pod_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store pod1
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust cs_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store cs1
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust turnout_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store turnout1
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust blank_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store blank1
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust null_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store null1
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
}

esttab turnout1 pp1 psoe1 pod1 cs1 blank1 null1, replace noomitted label nonotes noobs nodepvar nonumbers nogaps ///
 mtitles("Turnout" "PP" "PSOE" "Podemos" "Cs" "Blank" "Null") ///
 varlabels(RD_Estimate "Left mayor (2SLS)") collabels("" "") ///
 b(%9.3fc) se(%9.3fc) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 stats(first bw en n, label("First-stage" "Bandwidth" "Effective N" "N") fmt(%9.3gc)) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")

 
*Bottom table
quietly {
	rdrobust pp_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store pp2
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust psoe_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store psoe2
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust pod_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store pod2
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust cs_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store cs2
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust turnout_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store turnout2
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust blank_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store blank2
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
	rdrobust null_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store null2
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
}

esttab turnout2 pp2 psoe2 pod2 cs2 blank2 null2, replace noomitted label nonotes noobs nodepvar nonumbers nogaps ///
 mtitles("Turnout" "PP" "PSOE" "Podemos" "Cs" "Blank" "Null") ///
 varlabels(RD_Estimate "Left mayor (2SLS)") collabels("" "") ///
 b(%9.3fc) se(%9.3fc) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 stats(first bw en n, label("First-stage" "Bandwidth" "Effective N" "N") fmt(%9.3gc)) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")

 

**********
*TABLE B6*
**********

quietly {
	estimates clear

	rdbwselect pod_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_right) kernel(uni)
	ereturn clear
	ivregress 2sls pod_vs_cong1904 c.forcing_pp c.forcing_pp#i.first_pp (mayor_right = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.15,.15) & year==2015, first
	quietly rdrobust pod_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_right) kernel(uni) h(.15)
	estimates store right_pod1
	estadd scalar iv =  e(tau_cl)
	estadd scalar first =  e(tau_T_cl)
	estadd scalar bw = e(h_l)
	estadd scalar en =  e(N_h_l) +  e(N_h_r)
	estadd scalar n = e(N_l) + e(N_r)

	rdbwselect pod_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_right) kernel(uni)
	ereturn clear
	ivregress 2sls pod_vs_cong1911 c.forcing_pp c.forcing_pp#i.first_pp (mayor_right = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.15,.15) & year==2015, first
	quietly rdrobust pod_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015, fuzzy(mayor_right) kernel(uni) h(.15)
	estimates store right_pod2
	estadd scalar iv =  e(tau_cl)
	estadd scalar first =  e(tau_T_cl)
	estadd scalar bw = e(h_l)
	estadd scalar en =  e(N_h_l) +  e(N_h_r)
	estadd scalar n = e(N_l) + e(N_r)
}

esttab right_pod1 right_pod2, replace noomitted label nonotes noobs nodepvar nonumbers nogaps ///
 mtitles("Apr. 2019" "Nov. 2019") ///
 varlabels(RD_Estimate "Right-wing mayor 2015 (2SLS)") collabels("" "") ///
 b(%9.3fc) se(%9.3fc) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 stats(first bw en n, label("First-stage" "Bandwidth" "Effective N" "N") fmt(%9.3gc)) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********
*TABLE B7*
**********

quietly {
	estimates clear 

	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & population<=1000, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store size1
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)

	rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & population>1000, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store size2
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)

	rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & population<=1000, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store size3
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)

	rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & population>1000, fuzzy(mayor_left) kernel(uni) h(.15)
		estimates store size4
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
}

esttab size*, replace noomitted label nonotes noobs nodepvar nonumbers nogaps ///
 mlabels("Pop. <= 1,000" "Pop. > 1000" "Pop. <= 1,000" "Pop. > 1000") ///
 varlabels(RD_Estimate "Left mayor 2015 (2SLS)") collabels("" "") mgroups("Apr. 2019" "Nov. 2019", pattern(1 0 1 0) span) ///
 b(%9.3fc) se(%9.3fc) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 stats(first bw en n, label("First-stage" "Bandwidth" "Effective N" "N") fmt(%9.3gc)) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



***********
*FIGURE B3*
***********

quietly {
	estimates clear

	sum av_deficit_prim if small==0 & forcing_pp!=0 & year==2015, det
	local def_p50 `r(p50)'

	quietly rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & av_deficit_prim<`def_p50', fuzzy(mayor_left) kernel(uni) h(.15)
	quietly ivregress 2sls vox_vs_cong1904 c.forcing_pp c.forcing_pp#i.first_pp (mayor_left = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.15,.15) & year==2015 & av_deficit_prim<`def_p50', first
	margins, dydx(mayor_left) at(forcing_pp=(0)) saving(lowdef1904, replace)

	quietly sum av_deficit_prim if small==0 & forcing_pp!=0 & year==2015, det
	quietly rdrobust vox_vs_cong1904 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & av_deficit_prim>=`def_p50', fuzzy(mayor_left) kernel(uni) h(.15)
	quietly ivregress 2sls vox_vs_cong1904 c.forcing_pp c.forcing_pp#i.first_pp (mayor_left = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.15,.15) & year==2015 & av_deficit_prim>=`def_p50', first
	margins, dydx(mayor_left) at(forcing_pp=(0)) saving(highdef1904, replace)

	quietly sum av_deficit_prim if small==0 & forcing_pp!=0 & year==2015, det
	quietly rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & av_deficit_prim<`def_p50', fuzzy(mayor_left) kernel(uni) h(.15)
	quietly ivregress 2sls vox_vs_cong1911 c.forcing_pp c.forcing_pp#i.first_pp (mayor_left = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.15,.15) & year==2015 & av_deficit_prim<`def_p50', first
	margins, dydx(mayor_left) at(forcing_pp=(0)) saving(lowdef1911, replace)

	quietly sum av_deficit_prim if small==0 & forcing_pp!=0 & year==2015, det
	quietly rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2015 & av_deficit_prim>=`def_p50', fuzzy(mayor_left) kernel(uni) h(.15)
	quietly ivregress 2sls vox_vs_cong1911 c.forcing_pp c.forcing_pp#i.first_pp (mayor_left = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.15,.15) & year==2015 & av_deficit_prim>=`def_p50', first
	margins, dydx(mayor_left) at(forcing_pp=(0)) saving(highdef1911, replace)

	quietly combomarginsplot lowdef1904 lowdef1911, yline(0) recast(scatter) ///
	  title("") xtitle("") ytitle("Marginal effect of Left mayor 2015 on far-right support", size(*.8)) ///
	  xlabel(1 "Apr. 2019" 2 "Nov. 2019", glpattern(dash) glwidth(none)) ylabel(-.2(.1).2, glpattern(dash) glwidth(none)) xscale(range(.9 2.1)) ///
	  scheme(plotplain) savefile(lowdef, replace)

	quietly combomarginsplot highdef1904 highdef1911, yline(0) recast(scatter) ///
	  title("") xtitle("") ytitle("Marginal effect of Left mayor 2015 on far-right support", size(*.8)) ///
	  xlabel(1 "Apr. 2019" 2 "Nov. 2019", glpattern(dash) glwidth(none)) ylabel(-.2(.1).4, glpattern(dash) glwidth(none)) xscale(range(.9 2.1)) ///
	  scheme(plotplain) savefile(highdef, replace)
}

combomarginsplot lowdef highdef, yline(0) recast(scatter) ///
  title("") xtitle("") ytitle("Marginal effect of Left mayor 2015 on far-right support", size(*.8)) ///
  xlabel(1 "Apr. 2019" 2 "Nov. 2019", glpattern(dash) glwidth(none)) ylabel(-.2(.1).3, glpattern(dash) glwidth(none)) xscale(range(.75 2.25)) ///
  legend(order(3 "Low deficit" 4 "High deficit") size(*1)) ///
  scheme(plotplain) offset(.075)



**********
*TABLE B8*
**********

rdbwselect vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2019, fuzzy(mayor_left2019) kernel(uni)
ereturn clear

quietly {
	estimates clear

	ivregress 2sls vox_vs_cong1911 c.forcing_pp c.forcing_pp#i.first_pp (mayor_left2019 = first_pp) if small==0 & forcing_pp!=0 & inrange(forcing_pp,-.148,.148) & year==2019, first
	quietly rdrobust vox_vs_cong1911 forcing_pp if small==0 & forcing_pp!=0 & year==2019, fuzzy(mayor_left2019) kernel(uni) h(.148)
		estimates store immediate
		estadd scalar iv =  e(tau_cl)
		estadd scalar first =  e(tau_T_cl)
		estadd scalar bw = e(h_l)
		estadd scalar en =  e(N_h_l) +  e(N_h_r)
		estadd scalar n = e(N_l) + e(N_r)
}

esttab immediate, replace noomitted label nonotes noobs nodepvar nonumbers nogaps ///
 mtitles("Nov. 2019") ///
 varlabels(RD_Estimate "Left mayor 2019 (2SLS)") collabels("" "") ///
 b(%9.3fc) se(%9.3fc) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 stats(first bw en n, label("First-stage" "Bandwidth" "Effective N" "N") fmt(%9.3gc)) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********STUDY 3**********

use micro_backlash.dta, clear

*************
*PREPARATION*
*************

global controls i.SEXO EDAD i.education_cat
global controls2 i.SEXO EDAD i.education_cat interest informed i.recall


**********
*FIGURE 6*
**********

quietly {
	estimates clear
	
	foreach x of varlist right_e  right_c  right_i  {
	 eststo `x'1: ivregress 2sls `x'  (mayor_left_fullrev=first_pp), 
	 eststo `x'2: ivregress 2sls `x' $controls (mayor_left_fullrev=first_pp), 
	 eststo `x'3: ivregress 2sls `x' $controls2 (mayor_left_fullrev=first_pp), 
	 }

	coefplot (right_e1, offset(-.35))  (right_e2, offset(0)) (right_e3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-1(1)4, labsize(*1.35)) yline(0) title("Economic right", size(*1.35)) ytitle("Effect of Left Mayor", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr1, replace)
	coefplot (right_c1, offset(-.35))  (right_c2, offset(0)) (right_c3, offset(.35))   , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-1(1)4, labsize(*1.35)) yline(0) title("Cultural right", size(*1.35)) ytitle("", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr2, replace)
	coefplot (right_i1, offset(-.35))  (right_i2, offset(0)) (right_i3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-1(1)6, labsize(*1.35)) yline(0) title("Right Ideology", size(*1.35)) ytitle("Effect of Left Mayor", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr3, replace)
}

graph combine gr1.gph gr2.gph gr3.gph , imargin(vsmall) r(2)



**********
*FIGURE 7*
**********

quietly {
	estimates clear

	*Issue salience
	foreach x of varlist left_agenda right_agenda  {
	  eststo `x'1: ivregress 2sls `x'  (mayor_left_fullrev=first_pp), 
	  eststo `x'2: ivregress 2sls `x' $controls (mayor_left_fullrev=first_pp), 
	  eststo `x'3: ivregress 2sls `x' $controls2 (mayor_left_fullrev=first_pp), 
	 }
	coefplot (left_agenda1, offset(-.35))  (left_agenda2, offset(0)) (left_agenda3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical  ylabel(-.8(.2).4, labsize(*1.35)) yline(0) title("Left issues salience") ytitle("Effect of Left Mayor", size(*1.35)) yscale(titlegap(-12)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr1, replace)
	coefplot (right_agenda1, offset(-.35))  (right_agenda2, offset(0)) (right_agenda3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.8(.2).4, labsize(*1.35))  yline(0) title("Right issues salience") ytitle("", size(*1.35)) yscale(titlegap(-12)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr2, replace)
	graph combine gr1.gph gr2.gph , imargin(vsmall) r(1) title("Issue salience") saving(gg1, replace)

	*Compensation
	foreach x of varlist local_radical moderation  {
	  eststo `x'1: ivregress 2sls `x'  (mayor_left_fullrev=first_pp), 
	  eststo `x'2: ivregress 2sls `x' $controls1 (mayor_left_fullrev=first_pp), 
	  eststo `x'3: ivregress 2sls `x' $controls2 (mayor_left_fullrev=first_pp), 
	 }
	coefplot (local_radical1, offset(-.35))  (local_radical2, offset(0)) (local_radical3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.4(.2).4, labsize(*1.35)) yline(0) title("Radical local politics") ytitle("Effect of Left Mayor", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr3, replace)
	coefplot (moderation1, offset(-.35))  (moderation2, offset(0)) (moderation3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.4(.2).4, labsize(*1.35)) yline(0) title("Moderation necessary") ytitle("", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr4, replace)
	graph combine gr3.gph gr4.gph , imargin(vsmall) r(1) title("Compensation") saving(gg2, replace)

}

graph combine gg1.gph gg2.gph, rows(2)



***********
*FIGURE C1*
***********

estimates clear

quietly {
	estimates clear
	
	foreach x of varlist right_e  right_c  right_i  {
	  eststo `x'1 : reg `x'  mayor_left_fullrev  if compliant_fullrev==1,
	  eststo `x'2 : reg `x' $controls  mayor_left_fullrev if compliant_fullrev==1,
	  eststo `x'3 : reg `x' $controls2  mayor_left_fullrev if compliant_fullrev==1,
	 }

	coefplot (right_e1, offset(-.35)) (right_e2, offset(0)) (right_e3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-1(.5)2, labsize(*1.35)) yline(0) title("Economic right", size(*1.35)) ytitle("Effect of Left Mayor", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr1, replace)
	coefplot (right_c1, offset(-.35))  (right_c2, offset(0)) (right_c3, offset(.35))   , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-1(.5)2, labsize(*1.35)) yline(0) title("Cultural right", size(*1.35)) ytitle("", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr2, replace)
	coefplot (right_i1, offset(-.35)) (right_i2, offset(0)) (right_i3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-1(1)4, labsize(*1.35)) yline(0) title("Right Ideology", size(*1.35)) ytitle("Effect of Left Mayor", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr3, replace)

}

graph combine gr1.gph gr2.gph gr3.gph , imargin(vsmall) r(2)



***********
*FIGURE C2*
***********

estimates clear

quietly {
	estimates clear
	
	foreach x of varlist right_e  right_c  right_i  {
	  eststo `x'1 : reg `x'  mayor_left_fullrev,
	  eststo `x'2 : reg `x' $controls  mayor_left_fullrev,
	  eststo `x'3 : reg `x' $controls2  mayor_left_fullrev, 
	 }

	coefplot (right_e1, offset(-.35)) (right_e2, offset(0)) (right_e3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-1(.5)2, labsize(*1.35)) yline(0) title("Economic right", size(*1.35)) ytitle("Effect of Left Mayor", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr1, replace)
	coefplot (right_c1, offset(-.35))  (right_c2, offset(0)) (right_c3, offset(.35))   , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-1(.5)2, labsize(*1.35)) yline(0) title("Cultural right", size(*1.35)) ytitle("", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr2, replace)
	coefplot (right_i1, offset(-.35)) (right_i2, offset(0)) (right_i3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-1(1)4, labsize(*1.35)) yline(0) title("Right Ideology", size(*1.35)) ytitle("Effect of Left Mayor", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr3, replace)

}

graph combine gr1.gph gr2.gph gr3.gph , imargin(vsmall) r(2)



***********
*FIGURE C3*
***********

quietly {
	estimates clear

	foreach x of varlist left_agenda right_agenda  {
	  eststo `x'1: ivregress 2sls `x' mayor_left_fullrev if compliant_fullrev==1, 
	  eststo `x'2: ivregress 2sls `x' $controls mayor_left_fullrev if compliant_fullrev==1, 
	  eststo `x'3: ivregress 2sls `x' $controls2 mayor_left_fullrev if compliant_fullrev==1, 
	 }
	coefplot (left_agenda1, offset(-.35)) (left_agenda2, offset(0)) (left_agenda3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical  ylabel(-.6(.1).4, labsize(*1.35)) yline(0) title("Left issues salience") ytitle("Effect of Left Mayor", size(*1.35)) yscale(titlegap(-12)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr1, replace)
	coefplot (right_agenda1, offset(-.35)) (right_agenda2, offset(0)) (right_agenda3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.6(.1).4, labsize(*1.35))  yline(0) title("Right issues salience") ytitle("", size(*1.35)) yscale(titlegap(-12)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr2, replace)
}

graph combine gr1.gph gr2.gph , imargin(vsmall) r(1)



***********
*FIGURE C4*
***********

quietly {
	estimates clear

	foreach x of varlist left_agenda right_agenda  {
	  eststo `x'1: ivregress 2sls `x' mayor_left_fullrev, 
	  eststo `x'2: ivregress 2sls `x' $controls mayor_left_fullrev, 
	  eststo `x'3: ivregress 2sls `x' $controls2 mayor_left_fullrev, 
	 }
	coefplot (left_agenda1, offset(-.35)) (left_agenda2, offset(0)) (left_agenda3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical  ylabel(-.6(.1).4, labsize(*1.35)) yline(0) title("Left issues salience") ytitle("Effect of Left Mayor", size(*1.35)) yscale(titlegap(-12)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr1, replace)
	coefplot (right_agenda1, offset(-.35)) (right_agenda2, offset(0)) (right_agenda3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.6(.1).4, labsize(*1.35))  yline(0) title("Right issues salience") ytitle("", size(*1.35)) yscale(titlegap(-12)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr2, replace)

}

graph combine gr1.gph gr2.gph , imargin(vsmall) r(1)



***********
*FIGURE C5*
***********

quietly {
	estimates clear
	foreach x of varlist local_radical moderation  {
	  eststo `x'1: ivregress 2sls `x' mayor_left_fullrev if compliant_fullrev==1, 
	  eststo `x'2: ivregress 2sls `x' $controls mayor_left_fullrev if compliant_fullrev==1, 
	  eststo `x'3: ivregress 2sls `x' $controls2 mayor_left_fullrev if compliant_fullrev==1, 
	 }
	coefplot (local_radical1, offset(-.35))  (local_radical2, offset(0)) (local_radical3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.4(.1).4, labsize(*1.35)) yline(0) title("Radical local politics") ytitle("Effect of Left Mayor", size(*1.35)) yscale(titlegap(-10)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr3, replace)
	coefplot (moderation1, offset(-.35))  (moderation2, offset(0)) (moderation3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.4(.1).4, labsize(*1.35)) yline(0) title("Moderation necessary") ytitle("", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr4, replace)
}

graph combine gr3.gph gr4.gph , imargin(vsmall) r(1)



***********
*FIGURE C6*
***********

quietly {
	estimates clear
	foreach x of varlist local_radical moderation  {
	  eststo `x'1: ivregress 2sls `x' mayor_left_fullrev, 
	  eststo `x'2: ivregress 2sls `x' $controls mayor_left_fullrev, 
	  eststo `x'3: ivregress 2sls `x' $controls2 mayor_left_fullrev, 
	 }
	coefplot (local_radical1, offset(-.35))  (local_radical2, offset(0)) (local_radical3, offset(.35)) , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.4(.1).4, labsize(*1.35)) yline(0) title("Radical local politics") ytitle("Effect of Left Mayor", size(*1.35)) yscale(titlegap(-10)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr3, replace)
	coefplot (moderation1, offset(-.35))  (moderation2, offset(0)) (moderation3, offset(.35)) , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.4(.1).4, labsize(*1.35)) yline(0) title("Moderation necessary") ytitle("", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr4, replace)
}

graph combine gr3.gph gr4.gph , imargin(vsmall) r(1)



***********
*FIGURE C7*
***********

quietly {
	estimates clear
	foreach x of varlist PSOE_perceived  {
	 eststo `x'1: ivregress 2sls `x' (mayor_left_fullrev=first_pp),
	 eststo `x'2: ivregress 2sls `x' $controls (mayor_left_fullrev=first_pp),
	 eststo `x'3: ivregress 2sls `x' $controls2 (mayor_left_fullrev=first_pp),
	 }

	coefplot (PSOE_perceived1, offset(-.35))  (PSOE_perceived2, offset(0)) (PSOE_perceived3, offset(.35)), keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.4(.1).3, labsize(*1.2)) yline(0) title("IV models") ytitle("Effect of Left Mayor", size(*1.35)) yscale(titlegap(-10)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.2)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr1, replace)

	estimates clear
	foreach x of varlist PSOE_perceived  {
	  eststo `x'1 : reg `x'  mayor_left_fullrev if compliant_fullrev==1, 
	  eststo `x'2 : reg `x' $controls  mayor_left_fullrev if compliant_fullrev==1, 
	  eststo `x'3 : reg `x' $controls2  mayor_left_fullrev if compliant_fullrev==1, 
	 }

	coefplot (PSOE_perceived1, offset(-.35))  (PSOE_perceived2, offset(0)) (PSOE_perceived3, offset(.35)), keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.4(.1).3, labsize(*1.2)) yline(0) title("OLS models (compliants)") ytitle("", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.2)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr2, replace)
}
graph combine gr1.gph gr2.gph , imargin(vsmall) r(1)



***********
*FIGURE C8*
***********

quietly {
	estimates clear
	foreach x of varlist  PPlikely PPprepared  {
	 eststo `x'1: ivregress 2sls `x' (mayor_left_fullrev=first_pp),
	 eststo `x'2: ivregress 2sls `x' $controls (mayor_left_fullrev=first_pp),
	 eststo `x'3: ivregress 2sls `x' $controls2 (mayor_left_fullrev=first_pp),
	 }
	coefplot (PPlikely1, offset(-.35))  (PPlikely2, offset(0)) (PPlikely3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.4(.1).3, labsize(*1.35)) yline(0) title("PP likely to rule") ytitle("Effect of Left Mayor", size(*1.35)) yscale(titlegap(-10)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr1, replace)
	coefplot (PPprepared1, offset(-.35))  (PPprepared2, offset(0)) (PPprepared3, offset(.35))  , keep(mayor_left_fullrev) levels(95 90) vertical ylabel(-.4(.1).3, labsize(*1.35)) yline(0) title("PP prepared to rule") ytitle("", size(*1.35)) xlabel(.65 "No controls" 1 "Sociodem. controls" 1.35 "All controls", labsize(*1.35)) msymbol(circle) mfcolor(white) msize(vlarge) mlwidth(thick) ciopts(lwidth(medthick vthick)) legend(off) scheme(plotplain) saving(gr2, replace)
}

graph combine gr1.gph gr2.gph , imargin(vsmall) r(1)



**********
*TABLE C1*
**********

quietly {
estimates clear
eststo balance: logit first_pp SEXO EDAD interest informed evaluation_government ideology P1 i.EDUCATION
}

esttab balance, replace noomitted label nonotes noobs nodepvars nomtitle noconstant ///
	drop(1.EDUCATION) ///
    se star(* 0.05 ** 0.01 *** 0.001)


**********
*TABLE C2*
**********

quietly {
	global interaction i.mayor_left_fullrev *_recall psoe_i pp_i pod_i cs_i vox_i

	estimates clear
	foreach x of varlist right_e  right_c  right_i  {
	 eststo `x': ivregress 2sls `x' $interaction $controls2 (mayor_left_fullrev=first_pp), 
	 }
}

esttab right_e right_c right_i, replace noomitted label nonotes nodepvar nomtitles noconstant nobase ///
 keep (mayor_left_fullrev *_recall psoe_i pp_i pod_i cs_i vox_i) ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 mlabels("Economic right" "Cultural right" "Right ideology") ///
 collabels("" "") ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********
*TABLE C3*
**********

global interaction i.mayor_left_fullrev icat1 icat2 icat4 icat5 i1 i2 i4 i5 

estimates clear

foreach x of varlist PTV_Vox  {
 eststo `x'2: ivregress 2sls `x' $interaction $controls2 (mayor_left_fullrev=first_pp), 
 }

eststo ptvvox: ivregress 2sls PTV_Vox $interaction $controls2 (mayor_left_fullrev=first_pp)
  
esttab ptvvox, replace noomitted label nonotes nodepvar nomtitles noconstant nobase ///
 keep(mayor_left_fullrev icat1 icat2 icat4 icat5 i1 i2 i4 i5) ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 mlabels("PTV Vox") ///
 collabels("" "") ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********
*TABLE D2*
**********

quietly {
	estimates clear

	eststo econ_nocovs:  ivregress 2sls right_e   (mayor_left_fullrev=first_pp), 
	eststo cult_nocovs:  ivregress 2sls right_c   (mayor_left_fullrev=first_pp), 
	eststo ideol_nocovs: ivregress 2sls right_i   (mayor_left_fullrev=first_pp), 

	eststo econ_sdcovs:  ivregress 2sls right_e  i.SEXO EDAD i.education_cat  (mayor_left_fullrev=first_pp), 
	eststo cult_sdcovs:  ivregress 2sls right_c  i.SEXO EDAD i.education_cat  (mayor_left_fullrev=first_pp), 
	eststo ideol_sdcovs: ivregress 2sls right_i  i.SEXO EDAD i.education_cat  (mayor_left_fullrev=first_pp), 

	eststo econ_allcovs:  ivregress 2sls right_e i.SEXO EDAD i.education_cat interest informed i.recall (mayor_left_fullrev=first_pp), 
	eststo cult_allcovs:  ivregress 2sls right_c i.SEXO EDAD i.education_cat interest informed  i.recall (mayor_left_fullrev=first_pp), 
	eststo ideol_allcovs: ivregress 2sls right_i i.SEXO EDAD i.education_cat interest informed  i.recall (mayor_left_fullrev=first_pp), 
}
	
esttab econ_nocovs econ_sdcovs econ_allcovs  cult_nocovs cult_sdcovs cult_allcovs ideol_nocovs ideol_sdcovs ideol_allcovs , replace noomitted label nonotes nodepvar nomtitles noconstant nobase ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 collabels("" "") mgroups("Economic right" "Cultural right" "Right ideology", pattern(1 0 0 1 0 0 1 0 0) span) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********
*TABLE D3*
**********

quietly {
	estimates clear

	eststo left_nocovs:  ivregress 2sls left_a   (mayor_left_fullrev=first_pp), 
	eststo right_nocovs:  ivregress 2sls right_a   (mayor_left_fullrev=first_pp), 

	eststo left_sdcovs:  ivregress 2sls  left_a  i.SEXO EDAD i.education_cat  (mayor_left_fullrev=first_pp), 
	eststo right_sdcovs:  ivregress 2sls right_a  i.SEXO EDAD i.education_cat  (mayor_left_fullrev=first_pp), 

	eststo left_allcovs:  ivregress 2sls left_a i.SEXO EDAD i.education_cat interest informed  i.recall  (mayor_left_fullrev=first_pp), 
	eststo right_allcovs:  ivregress 2sls right_a i.SEXO EDAD i.education_cat interest informed   i.recall (mayor_left_fullrev=first_pp), 
}
	
esttab left_nocovs left_sdcovs left_allcovs right_nocovs right_sdcovs right_allcovs , replace noomitted label nonotes nodepvar nomtitles noconstant nobase ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 collabels("" "") mgroups("Left salience" "Right salience", pattern(1 0 0 1 0 0) span) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")



**********
*TABLE D4*
**********

quietly {
	estimates clear

	eststo rad_nocovs:  ivregress 2sls local_radical  (mayor_left_fullrev=first_pp), 
	eststo mod_nocovs:  ivregress 2sls moderation   (mayor_left_fullrev=first_pp), 

	eststo rad_sdcovs:  ivregress 2sls  local_radical  i.SEXO EDAD i.education_cat  (mayor_left_fullrev=first_pp), 
	eststo mod_sdcovs:  ivregress 2sls moderation  i.SEXO EDAD i.education_cat  (mayor_left_fullrev=first_pp), 

	eststo rad_allcovs:  ivregress 2sls local_radical i.SEXO EDAD i.education_cat interest informed   i.recall  (mayor_left_fullrev=first_pp), 
	eststo mod_allcovs:  ivregress 2sls moderation i.SEXO EDAD i.education_cat interest informed   i.recall (mayor_left_fullrev=first_pp), 
}
	
esttab  rad_nocovs rad_sdcovs rad_allcovs mod_nocovs mod_sdcovs mod_allcovs , replace noomitted label nonotes nodepvar nomtitles noconstant nobase  ///
 b(%9.3f) se(%9.3f) ///
 star(* 0.10 ** 0.05 *** 0.01) ///
 collabels("" "") mgroups("Radical local politics" "Moderation necessary", pattern(1 0 0 1 0 0) span) ///
 addnotes("Standard errors in parentheses" "\sym{*} \(p<.10\), \sym{**} \(p<.05\), \sym{***} \(p<.01\).")

